package model.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name = "TICKET", schema = "HB")
@SequenceGenerator(name = "SEQ_GEN", sequenceName = "EMP_SEQ", initialValue = 1, allocationSize = 1)
public class Tickets extends abstractEntity {

	private int seatNumber;
	private boolean seatCase;
	private Movies movies;
	private Seans seans;

	@Column(name="SEAT_NUMBER",nullable=false)
	public int getSeatNumber() {
		return seatNumber;
	}

	@Column(name="IS_FREE",nullable=false)
	public boolean isSeatCase() {
		return seatCase;
	}

	@JoinColumn(name="MOVIE_ID")
	public Movies getMovies() {
		return movies;
	}
	
	@JoinColumn(name="SEANS_ID")
	public Seans getSeans() {
		return seans;
	}

	public void setSeatNumber(int seatNumber) {
		this.seatNumber = seatNumber;
	}

	public void setSeatCase(boolean seatCase) {
		this.seatCase = seatCase;
	}

	public void setMovies(Movies movies) {
		this.movies = movies;
	}

	public void setSeans(Seans seans) {
		this.seans = seans;
	}

	@Override
	public String toString() {
		return "Tickets [seatNumber=" + seatNumber + ", seatCase=" + seatCase
				+ ", movies=" + movies + ", seans=" + seans + "]";
	}

}
